<?php

namespace App\Listeners;


class TestEventSubscriber
{
    /**
     * 为订阅者注册监听器.
     *
     * @param  Illuminate\Events\Dispatcher  $events
     */
    public function subscribe($events)
    {
        $events->listen(
          'App\Events\Test',
          'App\Listeners\TestEventSubscriber@test'
        );

        $events->listen(
          'App\Events\Test2',
          'App\Listeners\TestEventSubscriber@test2'
        );
    }

    public function test($event) {
      \Log::info( 'test subscriber' );
    }

    public function test2($event) {
      \Log::info( 'test2 subscriber' );
    }

}
